var Mock = require('mockjs')
module.exports = function() {
	return {
		//account
		'account-loginWX': Mock.mock({
			'resultSet|1-10': {
				'userToken': '123345566',
				'userName': '@cword(2,5)',
				'opendId': '@increment(100)',
				'userRole': '@name'
			},
			'retCode': 0,
			'retMsg': 'ok'
		}),
		'account-logoutWX': Mock.mock({
			'resultSet': {
				'userToken': '@csentence(1, 3)',
				'userName': '@cname',
				'opendId': '@increment(100)',
				'userRole': '@name'
			},
			'retCode': 0,
			'retMsg': 'ok'
		}),
		'account-login': Mock.mock({
			'resultSet': {
				'userToken': '123345566',
				'userName': '@cname',
				'opendId': '@increment(100)',
				'userRole': '@name'
			},
			'retCode': 0,
			'retMsg': 'ok'

		}),
		'account-resetPwd': Mock.mock({
			'resultSet': {

			},
			'retCode': 0,
			'retMsg': 'ok'
		}),

		//client
		'client-add': Mock.mock({
			'resultSet': {
				'clientId': '@increment(100)'
			},
			'retCode': 0,
			'retMsg': 'ok'
		}),
		'clientList': Mock.mock({
			'resultSet': {
				'clients|10': [{
					'clientId': '@increment(100)',
					'clientName': '@cword(6,20)',
					'englishName': '@clast',
					'activitiesNum': '@increment(1)',
					'opportunitiesNum': '@increment(1)',
					'contactNum': '@increment(1)'

				}],
				'pageNext': true
			},
			'retCode': '0000000',
			'retMsg': 'success'
		}),
		'client-home': Mock.mock({
			'resultSet': {
				'clientId': '@increment(100)',
				'clientName': '@cname',
				'englishName': '@clast',
				'activitiesNum': '@increment(100)',
				'opportunitiesNum': '@increment(100)',
				'contactNum': '@increment(100)',
				'employees|10': [{
					'employeeId': '@increment(100)',
					'employeeName': '@cname',
					'department|1': ['固定收益部','技术部','人力资源部'],
					'departmentId': '@increment(100)',
					'mobile': '13678906789',
					'activitiesNum': '@increment(100)'
				}],
				'contacts|10': [{
					'contactId': '@increment(100)',
					'contactName': '@cname',
					'title|1': ['总经理','副总经理','技术总监'],
					'activitiesNum': '@increment(100)',
					'department|1': ['固定收益部','技术部','人力资源部']
				}],
				'opportunities|10': [{
					'opportunityId': '@increment(100)',
					'opportunityDesc': '@csentence(1,30)',
					'contactId': '@increment(100)',
					'contactName': '@cname',
					'status': 0
				}],
				'activites|10': [{
					'activityId': '@increment(100)',
					'activityName': '@cword(6,15)',
					'date': '@date',
					'type|0-3': 1,
					'employeeId': '@increment(100)',
					'employeeName': '@cname'
				}],
				'contactPageNext': true,
				'opportunitiesPageNext': true,
				'activitiesPageNext': true
			},
			'retCode': 0,
			'retMsg': 'ok'
		}),
		'client-search': Mock.mock({
			'resultSet': {
				'count': '@id',
				'clients|10': [{
					'activitiesNum': '@increment(100)',
					'englishName': '@cname',
					'opportunitiesNum': '@cname',
					'clientId': 'increment(100)',
					'clientName': '@cname',
					'contactNum': '@increment(100)'
				}],
				'pageNext': true
			},
			'retCode': 0,
			'retMsg': 'ok'
		}),
		'search-history': Mock.mock({
			'resultSet': {
				'clients|10': [{
					'clientId': '@increment(100)',
					'clientName': '@cname'
				}]
			},
			'retCode': 0,
			'retMsg': 'ok'
		}),
		'history-add': Mock.mock({
			'resultSet': {
				
			},
			'retCode': 0,
			'retMsg': 'ok'
		}),
		'search-recommand': Mock.mock({
			'resultSet': {
				'clients|10': [{
                     "clientId":'@csentence(1, 3)',
                     "clientName":'@csentence(1, 3)'
				}]
			},
			'retCode': 0,
			'retMsg': 'ok'
		}),
		'all-home': Mock.mock({
			'resultSet': {
				'clients': {
					'all': '@increment(100)',
					'active': '@increment(100)',
					'potential': '@increment(100)',
					'warn': '@increment(100)',
					'clientId': '@increment(100)',
					'clientName': '@name'
				},
				'activities': {
					'all': '@increment(100)',
					'activityId': '@increment(100)',
					'activityName': '@name'
				},
				'opportunities': {
					'all': '@increment(100)',
					'active': '@increment(100)',
					'opportunityId': '@increment(100)',
					'opportunityName': '@name'
				},
				'contacts': {
					'all': '@increment(100)',
					'active': '@increment(100)',
					'contact|3': [{
						"contactId": '@increment(100)',
						"contactName": '@cname'
					}]
				}
			},
			'retCode': 0,
			'retMsg': 'ok'
		}),

		//contact
		'contact-list': Mock.mock({
			'resultSet': {
				'contacts|10': [{
					'contactId': '@increment(100)',
					'contactName': '@cname',
					'clientId': '@increment(100)',
					'clientShortName': '@clast',
					'department|1': ['固定收益部','技术部','人力资源部'],
					'title': '@csentence(1, 3)'
				}],
				'pageNext': true
			},
			'retCode': 0,
			'retMsg': 'ok'
		}),
		'contact-grouplist':Mock.mock({
			'resultSet': {
				'A|3':[{
					'contactId': '@increment(100)',
					'contactName': '@cname',
					'clientId': '@increment(100)',
					'clientShortName': '@clast',
					'department|1': ['固定收益部','技术部','人力资源部'],
					'title': '@csentence(1, 3)'
				}],
				'B|5':[{
					'contactId': '@increment(100)',
					'contactName': '@cname',
					'clientId': '@increment(100)',
					'clientShortName': '@clast',
					'department|1': ['固定收益部','技术部','人力资源部'],
					'title': '@csentence(1, 3)'
				}],
				"C|8":[{
					'contactId': '@increment(100)',
					'contactName': '@cname',
					'clientId': '@increment(100)',
					'clientShortName': '@clast',
					'department|1': ['固定收益部','技术部','人力资源部'],
					'title': '@csentence(1, 3)'
				}],
				"D|7":[{
					'contactId': '@increment(100)',
					'contactName': '@cname',
					'clientId': '@increment(100)',
					'clientShortName': '@clast',
					'department|1': ['固定收益部','技术部','人力资源部'],
					'title': '@csentence(1, 3)'
				}],
				'M|3':[{
					'contactId': '@increment(100)',
					'contactName': '@cname',
					'clientId': '@increment(100)',
					'clientShortName': '@clast',
					'department|1': ['固定收益部','技术部','人力资源部'],
					'title': '@csentence(1, 3)'
				}],
				"Z|4":[{
					'contactId': '@increment(100)',
					'contactName': '@cname',
					'clientId': '@increment(100)',
					'clientShortName': '@clast',
					'department|1': ['固定收益部','技术部','人力资源部'],
					'title': '@csentence(1, 3)'
				}]
			},
			'retCode': 0,
			'retMsg': 'ok'
		}),
		'contact-add': Mock.mock({
			'resultSet': {
				'contactId': '@increment(100)'
			},
			'retCode': 0,
			'retMsg': 'ok'
		}),
		'contact-info': Mock.mock({
			'resultSet': {
				'contactId': '@increment(100)',
				'contactName': '@cname',
				'shareFlag|0-2':1,
				'gender|1':['先生','女士'] ,
				'clientId': '@increment(100)',
				'clientShortName': '@clast',
				'department|1': ['金融市场部','人力资源部'],
				'title|1': ['总经理','副总经理'],
				'mobile': '@id',
				'phone': '@id',
				'mail': '@id',
				'opportunities|10': [{
					'opportunityId': '@increment(100)',
					'opportunityDesc': '@csentence(1, 30)'
				}],
				'activities|10': [{
					'activityId': '@increment(100)',
					'activityName': '@csentence(1, 30)',
					'date': '@date',
					'type|0-3': 1,
					'employeeId': '@increment(100)',
					'employeeName': '@cword(2, 8)'
				}],
				'opportunitiesPageNext': true,
				'activitiesPageNext': true
			},
			'retCode': 0,
			'retMsg': 'ok'
		}),
		'contact-edit': Mock.mock({
			'resultSet': {

			},
			'retCode': 0,
			'retMsg': 'ok'
		}),

		//opportunity
		'opportunity-list': Mock.mock({
			'resultSet': {
				'opportunities|10': [{
					'opportunityId': '@increment(100)',
					'opportunityDesc': '@csentence(1, 30)',
					'clientId': '@increment(100)',
					'clientShortName': '@clast',
					'contactId': '@increment(100)',
					'contactName': '@cname',
					'status|0-1': 1
				}],
				'pageNext': true
			},
			'retCode': 0,
			'retMsg': 'ok'
		}),
		'opportunity-info': Mock.mock({
			'resultSet': {
				'opportunityId': '@increment(100)',
				"shareFlag|0-2":1,
				'date': '@date',
				'type|0-8': 1,
				'size|0-3': 1,
				'probability|1': [0,25,50,75,100],
				'opportunityDesc': '@csentence(1, 30)',
				'status|0-1': 1,
				'clientId': '@increment(100)',
				'clientShortName': '@clast',
				'employee': {
					'employeeId': '@increment(100)',
					'employeeName': '@cname',
					'departmentId': '@cname',
					'department|1': ['警容市场部','人力资源部','技术部'],
					'mobile': '13566778899'
				},
				'contact|10': [{
					'contactId': '@increment(100)',
					'contactName': '@cname',
					'title': '@csentence(1, 3)',
					'department': '@csentence(1, 3)',
					'activityNum': '@increment(100)'
				}],
				'activities|10': [{
					'activityId': '@increment(100)',
					'activityName': '@cword(6,15)',
					'date': '@date',
					'type|0-3': 1,
					'employeeId': '@increment(100)',
					'employeeName': '@Name'
				}]
			},
			'retCode': 0,
			'retMsg': 'ok'
		}),
		'opportunity-add': Mock.mock({
			'resultSet': {
				'opportunity': '@increment(100)'
			},
			'retCode': 0,
			'retMsg': 'ok'
		}),
		'opportunity-edit': Mock.mock({
			'resultSet': {
             
			},
			'retCode': 0,
			'retMsg': 'ok'
		}),
		//activity
		'activity-list': Mock.mock({
			'resultSet': {
				'userToken': '@csentence(1, 3)',
				'userName': '@cname',
				'opendId': '@increment(100)',
				'userRole': '@name',
				'activities|10': [{
					'activityId': '@increment(100)',
					'activityName': '@csentence(1, 30)',
					'date': '@date',
					"type|0-3": 1,
					'employeeId': '@increment(100)',
					'employeeName': '@cname',
					'clientId': '@id',
					'clientName': '@cname'
				}],
				'pageNext': true
			},
			'retCode': 0,
			'retMsg': 'ok'
		}),
		'activity-info': Mock.mock({
			'resultSet': {
				'activityId': '@increment(100)',
				/*'priviledge': [{
					'0': '只可修改'
				}, {
					'1': '只可授权'
				}, {
					'2': '即可修改又可授权'
				}],*/
				'priviledge|1':['只可修改','只可授权','即可修改又可授权'],
				'activityName': '@cname',
				'shareFlag|0-2':1,
				'clientId': '@increment(100)',
				'clientShortName': '@cname',
				'date': '@datetime',
				"type|0-3": 1,
				'memo': '@csentence(1, 30)',
				'feedback': '@csentence(1, 30)',
				'opportunity': {
					'opportunityId':'@increment(100)',
					"opportunityName":'@csentence(1, 30)'
				},
				'contacts|10': [{
					'contactId': '@increment(100)',
					'contactName': '@cname',
					'title': '@csentence(1, 3)',
					'department|1': ['人力资源部','技术部','金融市场部'],
					'activitiesNum': '@increment(100)'
				}],
				'employees|10': [{
					'employeeId': '@increment(100)',
					'employeeName': '@cname',
					'departmentId': '@increment(100)',
					'department|1': ['人力资源部','技术部','金融市场部'],
					'mobile': '@csentence(1, 3)'
					/*'activitiesNum': '@increment(100)'*/  //不用了
				}],

			},
			'retCode': 0,
			'retMsg': 'ok'
		}),
		'activity-edit': Mock.mock({
			'resultSet': {

			},
			'retCode': 0,
			'retMsg': 'ok'
		}),
		'activity-add': Mock.mock({
			'resultSet': {
				'activityId': '@increment(100)'
			},
			'retCode': 0,
			'retMsg': 'ok'
		}),
		//employee
		'employee-list': Mock.mock({
			'resultSet': {
				'employees|10': [{
					'employeeId': '@increment(100)',
					'employeeName': '@cname',
					'departmentId': '@increment(100)',
					'department': ['人力资源部','技术部','金融市场部'],
					'mobile': '@csentence(1, 3)'
				}]
			},
			'retCode': 0,
			'retMsg': 'ok'
		}),
		'employee-dict': Mock.mock({
			'userToken': '@csentence(1, 3)',
			'retCode': 19,
			'retMsg': 'ok'
		}),
		//util数据字典
		"util-dict": Mock.mock({
			'resultSet': {
				'activityType': [{
					"0":"电话",
					"1":"短信",
					"2":"电子邮件",
					"3":"会面"
				}],
				'opportunityType': [{
					"0":"产品购买",
					"1":"股权投资",
					"2":"IPO",
					"3":"并购",
					"4":"再融资",
					"5":"发债",
					"6":"股权融资",
					"7":"其他投资",
					"8":"其他融资"
				}],
				"opportunityStatus":[{
					"0":"开放",
					"1":"关闭"
				}],
				'opportunitySize':[{
					"1":"100-500万",
					"2":"500-3000万",
					"3":">3000万"
				}],
				"opportunityProbability":[{
					"0":"0",
					"25":"25%",
					"50":"50%",
					"75":"75%",
					"100":"100%"
				}],
				'shareFlag':[{
					"0":"仅领导可见",
					"1":"部门内共享",
					"2":"全公司共享"
				}]
			},
			'retCode': 0,
			'retMsg': 'ok'
		})
	}

}